<%
  title = item.name
  description = ""
  if hit.respond_to?(:highlight)
    title = hit.highlight.title if hit.highlight.title
    description = hit.highlight.body if hit.highlight.body
  end
%>

<div class="list-item list-avatar">
  <div class="avatar-box icon-box icon-repo">
    <%= icon_tag("avatar-repo") %>
  </div>
  <div class="title text-overflow"><%= link_to highlight(title), item.to_path, target: "_blank" %></div>
  <% if description.present? %>
    <div class="description text-overflow">
      <%= highlight description %>
    </div>
  <% end %>
  <div class="info">
    <span class="user text-overflow">
      <%= icon_tag("user") %> <%= user_name_tag(item.user) %>
    </span>
  </div>
</div>